// page/sell/sell.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list: [],
    obj1:[],
    list1:[],
    smallPrice: '0', //总计和小计
    sellType: '业务类型一',
    show:true,
    date: {
      date: '2019-01-01 13:37',
      startDate: '2019-01-01 12:37',
      endDate: '2019-03-12 12:38',
      placeholder: '请选择时间',
    },
    date1: {
      date: '2019-01-01 13:37',
      startDate: '2019-01-01 12:37',
      endDate: '2019-03-12 12:38',
      placeholder: '请选择时间',
    },
  },
  addMeal() {
    wx.navigateTo({
      url: '/pages/openOrder/selMeal/selMeal',
    })
  },
  //选取业务类型
  sellType() {
    var list = ['洗车','修车','打蜡','换轮胎'];
    var _this = this
    wx.showActionSheet({
      itemList: list,
      itemColor:'#333333',
      fontSize:'28rpx;',
      success(res) {
        console.log(list[res.tapIndex])
        _this.setData({
          sellType: list[res.tapIndex],
          colorBool: false
        })
      },
      fail(res) {
        console.log(res.errMsg)
      }
    })
  },
  // 时间选取
  onPickerChange(e) {
    this.setData({
      date: e.detail.dateString
    })
    console.log(this.data.date)
  },
  onPickerChange1(e) {
    this.setData({
      date1: e.detail.dateString
    })
    console.log(this.data.date1)
  },


  deleSell() {
    this.setData({
      list: '',
      smallPrice: '0'
    })
  },
  // 总计弹窗
  show() {
    this.setData({
      show:false
    })
  },
  hide() {
    this.setData({
      show: true
    })
  },
  //获取备注的内容
  getContent(e) {
    console.log(e.detail.value)
  },
  cancel(){
    this.setData({
      show: true
    })
  },
  
})